package com.gusto.engine.colfil.neighborhood;

import com.gusto.engine.colfil.Prediction;
import com.gusto.engine.colfil.Rating;
import com.gusto.engine.colfil.service.CollaborativeService;

/**
 * <p>Collaborative system event listener.
 * Used by the aspect to inject all the events arising from {@link CollaborativeService}.</p>
 * 
 * @author amokrane.belloui@gmail.com
 *
 */
public interface ColEventListener {
	
	/**
	 * A rating has been added
	 * @param userId
	 * @param itemId
	 * @param rating
	 * @param checkExistence
	 * @throws Throwable
	 */
	public void ratingInserted(long userId, long itemId, Rating rating, boolean checkExistence) throws Throwable;
	
	/**
	 * A prediction had been added
	 * @param userId
	 * @param itemId
	 * @param prediction
	 * @throws Throwable
	 */
	@Deprecated
	public void predictionInserted(long userId, long itemId, Prediction prediction) throws Throwable;
	
}
